﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using KKSG;
using ProtoBuf;
using UnityEngine;
using XMainClient.UI;
using XMainClient.UI.UICommon;
using XUpdater;
using XUtliPoolLib;

namespace XMainClient
{
	// Token: 0x02000FE5 RID: 4069
	public class XGame : XSingleton<XGame>
	{
		// Token: 0x170036E9 RID: 14057
		// (get) Token: 0x0600D38F RID: 54159 RVA: 0x0031B6E4 File Offset: 0x003198E4
		// (set) Token: 0x0600D390 RID: 54160 RVA: 0x0031B6FC File Offset: 0x003198FC
		public bool IsGMAccount
		{
			get
			{
				return this._isgmaccount;
			}
			set
			{
				this._isgmaccount = value;
			}
		}

		// Token: 0x170036EA RID: 14058
		// (get) Token: 0x0600D391 RID: 54161 RVA: 0x0031B708 File Offset: 0x00319908
		// (set) Token: 0x0600D392 RID: 54162 RVA: 0x0031B720 File Offset: 0x00319920
		public bool ShowBuildLog
		{
			get
			{
				return this._show_build_log;
			}
			set
			{
				this._show_build_log = value;
			}
		}

		// Token: 0x170036EB RID: 14059
		// (get) Token: 0x0600D393 RID: 54163 RVA: 0x0031B72C File Offset: 0x0031992C
		// (set) Token: 0x0600D394 RID: 54164 RVA: 0x0031B744 File Offset: 0x00319944
		public ulong PlayerID
		{
			get
			{
				return this._player_id;
			}
			set
			{
				this._player_id = value;
			}
		}

		// Token: 0x170036EC RID: 14060
		// (get) Token: 0x0600D395 RID: 54165 RVA: 0x0031B750 File Offset: 0x00319950
		public bool CalcFps
		{
			get
			{
				return this._calc_fps;
			}
		}

		// Token: 0x170036ED RID: 14061
		// (get) Token: 0x0600D396 RID: 54166 RVA: 0x0031B768 File Offset: 0x00319968
		public float Fps
		{
			get
			{
				return this._fps;
			}
		}

		// Token: 0x170036EE RID: 14062
		// (get) Token: 0x0600D397 RID: 54167 RVA: 0x0031B780 File Offset: 0x00319980
		public float FpsAvg
		{
			get
			{
				return this._fpsAvg;
			}
		}

		// Token: 0x170036EF RID: 14063
		// (get) Token: 0x0600D398 RID: 54168 RVA: 0x0031B798 File Offset: 0x00319998
		public XStage CurrentStage
		{
			get
			{
				return this._stage;
			}
		}

		// Token: 0x170036F0 RID: 14064
		// (get) Token: 0x0600D399 RID: 54169 RVA: 0x0031B7B0 File Offset: 0x003199B0
		public bool StageReady
		{
			get
			{
				return this._stage != null && this._stage.IsEntered;
			}
		}

		// Token: 0x170036F1 RID: 14065
		// (get) Token: 0x0600D39A RID: 54170 RVA: 0x0031B7D8 File Offset: 0x003199D8
		internal XDocuments Doc
		{
			get
			{
				return this._doc;
			}
		}

		// Token: 0x170036F2 RID: 14066
		// (get) Token: 0x0600D39B RID: 54171 RVA: 0x0031B7F0 File Offset: 0x003199F0
		// (set) Token: 0x0600D39C RID: 54172 RVA: 0x0031B808 File Offset: 0x00319A08
		public int SyncModeValue
		{
			get
			{
				return this._nSyncMode;
			}
			set
			{
				this._nSyncMode = value;
				Physics.IgnoreLayerCollision(10, 10, this.SyncMode);
				Physics.IgnoreLayerCollision(21, 13, this.SyncMode);
			}
		}

		// Token: 0x170036F3 RID: 14067
		// (get) Token: 0x0600D39D RID: 54173 RVA: 0x0031B834 File Offset: 0x00319A34
		public bool SyncMode
		{
			get
			{
				return this._nSyncMode == 1;
			}
		}

		// Token: 0x0600D39E RID: 54174 RVA: 0x0031B850 File Offset: 0x00319A50
		public XGame()
		{
			this._singletons = new List<XBaseSingleton>();
			this._singletons.Add(XSingleton<BufferPoolMgr>.singleton);
			this._singletons.Add(XSingleton<ScriptCode>.singleton);
			XSingleton<XStringTable>.singleton.Uninit();
			this._singletons.Add(XSingleton<XStringTable>.singleton);
			this._singletons.Add(XSingleton<XInput>.singleton);
			this._singletons.Add(XSingleton<XServerTimeMgr>.singleton);
			this._singletons.Add(XSingleton<XGlobalConfig>.singleton);
			this._singletons.Add(XSingleton<XGameUI>.singleton);
			this._singletons.Add(XSingleton<XSceneMgr>.singleton);
			this._singletons.Add(XSingleton<XBuffTemplateManager>.singleton);
			this._singletons.Add(XSingleton<XAudioMgr>.singleton);
			this._singletons.Add(XSingleton<XSkillEffectMgr>.singleton);
			this._singletons.Add(XSingleton<XPostEffectMgr>.singleton);
			this._singletons.Add(XSingleton<XLevelFinishMgr>.singleton);
			this._singletons.Add(XSingleton<XCombat>.singleton);
			this._singletons.Add(XSingleton<XProfessionSkillMgr>.singleton);
			this._singletons.Add(XSingleton<XGameSysMgr>.singleton);
			this._singletons.Add(XSingleton<XOperationRecord>.singleton);
			this._singletons.Add(XSingleton<XLevelDoodadMgr>.singleton);
			this._singletons.Add(XSingleton<XTutorialMgr>.singleton);
			this._singletons.Add(XSingleton<XEntityMgr>.singleton);
			this._singletons.Add(XSingleton<XScene>.singleton);
			this._singletons.Add(XSingleton<XForbidWordMgr>.singleton);
			this._singletons.Add(XSingleton<XSkillFactory>.singleton);
			this._singletons.Add(XSingleton<XCutScene>.singleton);
			this._singletons.Add(XSingleton<XBulletMgr>.singleton);
			this._singletons.Add(XSingleton<XAttributeMgr>.singleton);
			this._singletons.Add(XSingleton<XEventMgr>.singleton);
			this._singletons.Add(XSingleton<XPowerPointCalculator>.singleton);
			this._singletons.Add(XSingleton<UIManager>.singleton);
			this._singletons.Add(XSingleton<XLevelSpawnMgr>.singleton);
			this._fpsHandler = new XTimerMgr.ElapsedEventHandler(this.CalculateFPS);
			this._innerSwitchCb = new XTimerMgr.ElapsedEventHandler(this.InnerSwitch);
			this._doc = new XDocuments();
		}

		// Token: 0x0600D39F RID: 54175 RVA: 0x0031BB64 File Offset: 0x00319D64
		public IEnumerator Awake()
		{
			XLinkTimeStamp.FetchBuildDateTime();  //获取dll生成时间
			this.TriggerFps();  //计算帧率
			PtcRegister.RegistProtocol();  //协议处理回调注册
			XSingleton<XResourceLoaderMgr>.singleton.LoadServerCurve("Table/Curve");
			XSingleton<XClientNetwork>.singleton.Initialize();  //网络模块初始化
			CVSReader.Init();  //Reader初始化
			int i = 0;
			//初始化单例
			for (i = 0; i < this._singletons.Count; i++)
			{
				int tryCount = 0;
				while (!this._singletons[i].Init())
				{
					if ((++tryCount) % 1000 == 0)
					{
						Thread.Sleep(1);
					}
				}
			}
			GC.Collect();
			i = 0;
			//背包配置加载
			XBagDocument.Execute(new OnLoadedCallback(XBagDocument.OnTableLoaded));
			while (!XBagDocument.AsyncLoader.IsDone)
			{
				if ((++i) % 1000 == 0)
				{
					Thread.Sleep(1);
				}
			}
			this._doc.CtorLoad();  //Doc初始化
			this._doc.Initilize(0);
			//Serializer.SetMultiThread(XSingleton<XGlobalConfig>.singleton.GetSettingEnum(ESettingConfig.EMultiThreadProtoBuf));
			//Serializer.SetSkipProtoIgnore(XSingleton<XGlobalConfig>.singleton.GetSettingEnum(ESettingConfig.ESkipProtoIgnore));
			XAutoFade.MakeBlack(true);
			XOptionsDocument optDoc = XDocuments.GetSpecificDocument<XOptionsDocument>(XOptionsDocument.uuID);
			if (optDoc != null)
			{
				int value = optDoc.GetValue(XOptionsDefine.OD_SMOOTH);
				XSingleton<XGameUI>.singleton.SetUIOptOption(false, value == 1, false, false);
			}
			if (XSingleton<XGlobalConfig>.singleton.GetSettingEnum(ESettingConfig.EApm))
			{
				XSingleton<XUpdater.XUpdater>.singleton.XPlatform.InitApm();
			}
			XResourceLoaderMgr.UseCurveTable = XSingleton<XGlobalConfig>.singleton.GetSettingEnum(ESettingConfig.ELoadCurveTable);
			XSingleton<XResourceLoaderMgr>.singleton.DelayLoad = XSingleton<XGlobalConfig>.singleton.GetSettingEnum(ESettingConfig.EDelayLoad);
			XFxMgr.FilterFarFx = XSingleton<XGlobalConfig>.singleton.GetSettingEnum(ESettingConfig.EFilterFarFx);
			yield return null;
			yield break;
		}

		// Token: 0x0600D3A0 RID: 54176 RVA: 0x0031BB74 File Offset: 0x00319D74
		public override bool Init()
		{
			XQualitySetting.InitResolution();
			if (Application.platform == RuntimePlatform.WindowsEditor || Application.platform == RuntimePlatform.OSXEditor || Application.platform == RuntimePlatform.WindowsPlayer)
			{
				Application.targetFrameRate = 60;
			}
			else
			{
				Application.targetFrameRate = XShell.TargetFrame;
			}
			XAutoFade.FadeIn(0f, true);
			this.SwitchTo(EXStage.Login, 3U);
			return true;
		}

		// Token: 0x0600D3A1 RID: 54177 RVA: 0x0031BBD8 File Offset: 0x00319DD8
		public override void Uninit()
		{
			this.SwitchTo(EXStage.Null, 0U);
			this._doc.Uninitilize();
			for (int i = this._singletons.Count - 1; i >= 0; i--)
			{
				this._singletons[i].Uninit();
			}
			XSingleton<XClientNetwork>.singleton.Close(NetErrCode.Net_NoError);
			XSingleton<XInterfaceMgr>.singleton.Uninit();
			INativePlugin nativePlugin = XSingleton<XUpdater.XUpdater>.singleton.XPlatform.GetNativePlugin();
			bool flag = nativePlugin != null;
			if (flag)
			{
				nativePlugin.CloseHooks();
			}
		}

		// Token: 0x0600D3A2 RID: 54178 RVA: 0x0031BC68 File Offset: 0x00319E68
		public void UpdateNetwork()
		{
			if (this.networkRun)
			{
				XSingleton<XClientNetwork>.singleton.Update();
			}
		}

		// Token: 0x0600D3A3 RID: 54179 RVA: 0x0031BC8C File Offset: 0x00319E8C
		public void PreUpdate(float fDeltaT)
		{
			bool flag = this.StageReady && this.notLoadScene;
			if (flag)
			{
				XSingleton<XInput>.singleton.Update();
				this._stage.PreUpdate(fDeltaT);
			}
		}

		// Token: 0x0600D3A4 RID: 54180 RVA: 0x0031BCCC File Offset: 0x00319ECC
		public void Update(float fDeltaT)
		{
			bool flag = this.StageReady && this.notLoadScene;
			if (flag)
			{
				this._stage.Update(fDeltaT);
				this._doc.Update(fDeltaT);
				XSingleton<UIManager>.singleton.Update(fDeltaT);
			}
			bool calc_fps = this._calc_fps;
			if (calc_fps)
			{
				this._fps_count++;
			}
			bool key = Input.GetKey(KeyCode.F3); //, 284);
			if (key)
			{
				XSingleton<X3DTouchMgr>.singleton.OnProcess3DTouch("");
			}
		}

		// Token: 0x0600D3A5 RID: 54181 RVA: 0x0031BD50 File Offset: 0x00319F50
		private void CheckExit()
		{
			bool keyDown = Input.GetKeyDown((KeyCode)27);
			if (keyDown)
			{
				bool flag = Time.time - this._lastExitClickTime < float.Parse(XSingleton<XGlobalConfig>.singleton.GetValue("DoubleClickExitTime"));
				if (flag)
				{
					Application.Quit();
				}
				XSingleton<UiUtility>.singleton.ShowSystemTip(XSingleton<XStringTable>.singleton.GetString("EXIT_GAME_TIP"), "fece00");
				this._lastExitClickTime = Time.time;
			}
		}

		// Token: 0x0600D3A6 RID: 54182 RVA: 0x0031BDC4 File Offset: 0x00319FC4
		public void PostUpdate(float fDeltaT)
		{
			bool flag = this.StageReady && this.notLoadScene;
			if (flag)
			{
				this._stage.PostUpdate(fDeltaT);
				this._doc.PostUpdate(fDeltaT);
				XSingleton<UIManager>.singleton.PostUpdate(fDeltaT);
			}
		}

		// Token: 0x0600D3A7 RID: 54183 RVA: 0x0031BE10 File Offset: 0x0031A010
		public void SwitchTo(EXStage eStage, uint sceneID)
		{
			//bool flag = sceneID == XSingleton<XScene>.singleton.SceneID && this.CurrentStage.Stage == eStage && sceneID != 3U && XSingleton<XScene>.singleton.SceneType != SceneType.SCENE_TOWER;
			if (sceneID == XSingleton<XScene>.singleton.SceneID && this.CurrentStage.Stage == eStage && sceneID != 3U && XSingleton<XScene>.singleton.SceneType != SceneType.SCENE_TOWER)
			{
				XSingleton<XDebug>.singleton.AddLog("switch to the same scene id ", sceneID.ToString(), " with same stage.", null, null, null, XDebugColor.XDebug_None);
			}
			//bool flag2 = eStage == EXStage.Null || sceneID == 0U;
			if (eStage == EXStage.Null || sceneID == 0U)
			{
				this._old_stage = this._stage;
				this._old_stage.OnLeaveStage(EXStage.Null);
				this._old_stage.OnLeaveScene(false);
				XSingleton<XScene>.singleton.OnLeaveScene(false);
				this._old_stage = null;
			}
			else
			{
				int stageType = XFastEnumIntEqualityComparer<EXStage>.ToInt(eStage);
				uint stage_scene_id = (uint)(stageType << 24 | (int)sceneID);
				//bool flag3 = this._stage == null || sceneID != XSingleton<XScene>.singleton.SceneID || XSingleton<XSceneMgr>.singleton.GetSceneSwitchToSelf(sceneID);
				if (this._stage == null || sceneID != XSingleton<XScene>.singleton.SceneID || XSingleton<XSceneMgr>.singleton.GetSceneSwitchToSelf(sceneID))
				{
					XSingleton<XScene>.singleton.UntriggerScene();
				}
				//bool flag4 = (eStage == EXStage.World || eStage == EXStage.Hall) && XSingleton<XScene>.singleton.TurnToTransfer(sceneID);
				if ((eStage == EXStage.World || eStage == EXStage.Hall) && XSingleton<XScene>.singleton.TurnToTransfer(sceneID))
				{
					XAutoFade.FadeOut(0.5f);
					XSingleton<XTimerMgr>.singleton.SetTimer(1f, this._innerSwitchCb, stage_scene_id | 2147483648U);
				}
				else
				{
					float sceneDelayTransfer = XSingleton<XSceneMgr>.singleton.GetSceneDelayTransfer(sceneID);
					//bool flag5 = sceneDelayTransfer > 0f;
					if (sceneDelayTransfer > 0f)
					{
						XAutoFade.FadeOut(sceneDelayTransfer);
						XSingleton<XTimerMgr>.singleton.SetTimer(sceneDelayTransfer + 0.03f, this._innerSwitchCb, stage_scene_id);
					}
					else
					{
						this.InnerSwitch(stage_scene_id);
					}
				}
			}
		}

		// Token: 0x0600D3A8 RID: 54184 RVA: 0x0031BFAC File Offset: 0x0031A1AC
		public XStage CreateSpecifiecStage(EXStage eStage)
		{
			XStage result;
			switch (eStage)
			{
			case EXStage.Login:
				result = XStage.CreateSpecificStage<XLoginStage>();
				break;
			case EXStage.SelectChar:
				result = XStage.CreateSpecificStage<XSelectcharStage>();
				break;
			case EXStage.World:
				result = XStage.CreateSpecificStage<XWorldStage>();
				break;
			case EXStage.Hall:
				result = XStage.CreateSpecificStage<XHallStage>();
				break;
			default:
				result = null;
				break;
			}
			return result;
		}

		// Token: 0x0600D3A9 RID: 54185 RVA: 0x0031BFFC File Offset: 0x0031A1FC
		public void TriggerFps()
		{
			//bool calc_fps = this._calc_fps;
			if (this._calc_fps)
			{
				XSingleton<XTimerMgr>.singleton.SetGlobalTimer(this._fps_interval, this._fpsHandler, null);
			}
		}

		// Token: 0x0600D3AA RID: 54186 RVA: 0x0031C02C File Offset: 0x0031A22C
		private void InnerSwitch(object o)
		{
			this.switchScene = true;
			uint num = (uint)o;
			bool transferFlag = (num >> 31) > 0U;
			uint sceneId = num & 16777215U;
			EXStage exstage = (EXStage)((num >> 24) & 127U);
			//bool flag2 = transferFlag;
			if (transferFlag)
			{
				XAutoFade.MakeBlack(false);
			}
			//bool flag3 = XSingleton<XScene>.singleton.SceneID == 100U;
			if (XSingleton<XScene>.singleton.SceneID == 100U)
			{
				XAutoFade.FadeIn(0.2f, false);
			}
			this._old_stage = this._stage;
			this._stage = ((this._old_stage != null && exstage == this._old_stage.Stage) ? this._old_stage : this.CreateSpecifiecStage(exstage));
			//bool flag4 = this._old_stage != null;
			if (this._old_stage != null)
			{
				this._old_stage.OnLeaveStage(this._stage.Stage);
				//bool flag5 = sceneId != XSingleton<XScene>.singleton.SceneID || XSingleton<XSceneMgr>.singleton.GetSceneSwitchToSelf(sceneId);
				if (sceneId != XSingleton<XScene>.singleton.SceneID || XSingleton<XSceneMgr>.singleton.GetSceneSwitchToSelf(sceneId))
				{
					XSingleton<XGameUI>.singleton.m_uiTool.EnableUILoadingUpdate(false);
					this._old_stage.OnLeaveScene(transferFlag);
					//bool flag6 = XSingleton<XScene>.singleton.SceneID > 0U;
					if (XSingleton<XScene>.singleton.SceneID > 0U)
					{
						XSingleton<XScene>.singleton.OnLeaveScene(transferFlag);
					}
					XSingleton<XScene>.singleton.LoadSceneAsync(sceneId, exstage, !transferFlag, transferFlag);
				}
				else
				{
					this.OnEnterStage();
					this.switchScene = false;
				}
			}
			else
			{
				XSingleton<XScene>.singleton.LoadSceneAsync(sceneId, exstage, true, false);
			}
		}

		// Token: 0x0600D3AB RID: 54187 RVA: 0x0031C188 File Offset: 0x0031A388
		private void LockFps(int goal)
		{
			float num = 1f / (float)goal - Time.smoothDeltaTime;
			bool flag = num > 0f;
			if (flag)
			{
				this._millisecondsToWait++;
			}
			else
			{
				this._millisecondsToWait--;
			}
			Thread.Sleep((int)Mathf.Clamp((float)this._millisecondsToWait, 0f, 1f / (float)goal * 1000f));
		}

		// Token: 0x0600D3AC RID: 54188 RVA: 0x0031C1F8 File Offset: 0x0031A3F8
		private void CalculateFPS(object o)
		{
			float realtimeSinceStartup = Time.realtimeSinceStartup;
			this._fps = (float)this._fps_count / (realtimeSinceStartup - this._fps_real_time);
			this._fpsCalcCount++;
			this._fpsAcc += this._fps;
			bool flag = this._fpsCalcCount >= 20;
			if (flag)
			{
				this._fpsAvg = this._fpsAcc / (float)this._fpsCalcCount;
				this._fpsCalcCount = 0;
				this._fpsAcc = 0f;
			}
			bool flag2 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.MainDoc != null;
			if (flag2)
			{
				bool flag3 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.MainDoc.GetFpsState == XMainInterfaceDocument.GetFps.start;
				if (flag3)
				{
					DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.MainDoc.FpsStartTime = realtimeSinceStartup;
					DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.MainDoc.PeakFps = this._fps;
					DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.MainDoc.FpsCount = this._fps_count;
					DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.MainDoc.GetFpsState = XMainInterfaceDocument.GetFps.running;
				}
				else
				{
					bool flag4 = DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.MainDoc.GetFpsState == XMainInterfaceDocument.GetFps.running;
					if (flag4)
					{
						DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.MainDoc.PeakFps = Math.Max(this._fps, DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.MainDoc.PeakFps);
						DlgBase<XMainInterface, XMainInterfaceBehaviour>.singleton.MainDoc.FpsCount += this._fps_count;
					}
				}
			}
			this._fps_real_time = realtimeSinceStartup;
			this._fps_count = 0;
			XSingleton<XTimerMgr>.singleton.SetGlobalTimer(this._fps_interval, this._fpsHandler, null);
		}

		// Token: 0x0600D3AD RID: 54189 RVA: 0x0031C381 File Offset: 0x0031A581
		private void OnEnterStage()
		{
			this._stage.OnEnterStage((this._old_stage != null) ? this._old_stage.Stage : EXStage.Null);
		}

		// Token: 0x0600D3AE RID: 54190 RVA: 0x0031C3A8 File Offset: 0x0031A5A8
		public void OnEnterScene(uint sceneid, bool bTransfer = false)
		{
			bool bHall = XSingleton<XSceneMgr>.singleton.GetSceneType(sceneid) == SceneType.SCENE_HALL || XSingleton<XSceneMgr>.singleton.GetSceneType(sceneid) == SceneType.SCENE_GUILD_HALL || XSingleton<XSceneMgr>.singleton.GetSceneType(sceneid) == SceneType.SCENE_LEISURE;
			XSingleton<XScene>.singleton.GameCamera.PreInstall(GameObject.Find("Main Camera"), bHall);
			XSingleton<XScene>.singleton.OnEnterScene(sceneid, bTransfer);
			this._stage.OnEnterScene(sceneid, bTransfer);
			XSingleton<XScene>.singleton.GameCamera.Installed();
			XSingleton<XScene>.singleton.AssociatedCamera = XSingleton<XScene>.singleton.GameCamera.UnityCamera;
			XSingleton<XAIGeneralMgr>.singleton.InitAIMgr();
			this.OnEnterStage();
		}

		// Token: 0x0600D3AF RID: 54191 RVA: 0x0031C458 File Offset: 0x0031A658
		public string GetSyncModeString()
		{
			string result;
            switch (this._nSyncMode)
            {
                case 0:
					result = " Solo Mode ";
					break;
                case 1:
					result = " OnLine Mode ";
					break;
                case 2:
					result = " Mixed Mode ";
					break;
                default:
					result = "Unknown";
					break;
            }
			return result;
		}

		// Token: 0x0600D3B0 RID: 54192 RVA: 0x0031C4B4 File Offset: 0x0031A6B4
		public static void SetVisible(GameObject go, int layer)
		{
			go.layer = layer;
			for (int i = 0; i < go.transform.childCount; i++)
			{
				Transform child = go.transform.GetChild(i);
				XGame.SetVisible(child.gameObject, layer);
			}
		}

		// Token: 0x04006028 RID: 24616
		public static int RoleCount;

		// Token: 0x04006029 RID: 24617
		private XStage _stage = null;

		// Token: 0x0400602A RID: 24618
		private XStage _old_stage = null;

		// Token: 0x0400602B RID: 24619
		private List<XBaseSingleton> _singletons = null;

		// Token: 0x0400602C RID: 24620
		private XDocuments _doc = null;

		// Token: 0x0400602D RID: 24621
		private int _nSyncMode = 0;

		// Token: 0x0400602E RID: 24622
		private bool _show_build_log = true;

		// Token: 0x0400602F RID: 24623
		private int _fps_count = 0;

		// Token: 0x04006030 RID: 24624
		private float _fps = (float)XShell.TargetFrame;

		// Token: 0x04006031 RID: 24625
		private float _fpsAvg = (float)XShell.TargetFrame;

		// Token: 0x04006032 RID: 24626
		private float _fps_interval = 0.16667f;

		// Token: 0x04006033 RID: 24627
		private bool _calc_fps = true;

		// Token: 0x04006034 RID: 24628
		private float _fps_real_time = 0f;

		// Token: 0x04006035 RID: 24629
		private int _fpsCalcCount = 0;

		// Token: 0x04006036 RID: 24630
		private float _fpsAcc = 0f;

		// Token: 0x04006037 RID: 24631
		private bool _isgmaccount = false;

		// Token: 0x04006038 RID: 24632
		private ulong _player_id = 0UL;

		// Token: 0x04006039 RID: 24633
		private int _millisecondsToWait = 0;

		// Token: 0x0400603A RID: 24634
		private float _lastExitClickTime = 0f;

		// Token: 0x0400603B RID: 24635
		private XTimerMgr.ElapsedEventHandler _fpsHandler = null;

		// Token: 0x0400603C RID: 24636
		private XTimerMgr.ElapsedEventHandler _innerSwitchCb = null;

		// Token: 0x0400603D RID: 24637
		public bool notLoadScene = true;

		// Token: 0x0400603E RID: 24638
		public bool networkRun = true;

		// Token: 0x0400603F RID: 24639
		public bool switchScene = false;

		// Token: 0x04006040 RID: 24640
		public static bool EditorMode = false;
	}
}
